package com.imgo.max.fans.service;

import com.imgo.max.common.dto.ResultDO;
import com.imgo.max.common.result.FansResultCodeEnum;

/**
 * Created by darren.dai on 10/26/16.
 */
public class FansBaseServiceImpl {

    protected void setResultDOResultCode(ResultDO resultDO, FansResultCodeEnum fansResultCodeEnum) {
        if (fansResultCodeEnum.getResultCode() != FansResultCodeEnum.SUCCESS.getResultCode()) {
            resultDO.setSuccess(false);
        }
        resultDO.setResultCode(fansResultCodeEnum.getResultCode());
        resultDO.setErrorMessage(fansResultCodeEnum.getMessage());
    }
}
